<html>
<head><meta charset="utf-8"><title>sprint day 4 chat · t-compiler/shrinkmem-sprint · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/index.html">t-compiler/shrinkmem-sprint</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html">sprint day 4 chat</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="228711690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228711690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228711690">(Mar 04 2021 at 03:47)</a>:</h4>
<p>I forgot to set up a casual chat channel Wednesday, so here's an early one for Thursday</p>



<a name="228746970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228746970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228746970">(Mar 04 2021 at 10:17)</a>:</h4>
<p>FYI: I've attempted to add similar stats to <code>rusage</code> on Windows: <a href="https://github.com/rust-lang/rust/pull/82754">https://github.com/rust-lang/rust/pull/82754</a></p>



<a name="228780365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228780365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228780365">(Mar 04 2021 at 14:24)</a>:</h4>
<p>was doing the <code>mir_opt_level</code> work, <a href="https://github.com/rust-lang/rust/issues/82736">#82736</a> is up and already r+</p>



<a name="228780783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228780783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228780783">(Mar 04 2021 at 14:27)</a>:</h4>
<p><span class="user-mention silent" data-user-id="224872">rylev</span> <a href="#narrow/stream/276895-t-compiler.2Fshrinkmem-sprint/topic/sprint.20day.204.20chat/near/228746970">said</a>:</p>
<blockquote>
<p>FYI: I've attempted to add similar stats to <code>rusage</code> on Windows: <a href="https://github.com/rust-lang/rust/pull/82754">https://github.com/rust-lang/rust/pull/82754</a></p>
</blockquote>
<p>Hey @rylev, do you have any inkling as to how <em>accurate</em> the values look that you get out? Do they seem plausible?</p>



<a name="228780787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228780787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228780787">(Mar 04 2021 at 14:27)</a>:</h4>
<p>moved the rest of the messages to <a class="stream-topic" data-stream-id="276895" href="/#narrow/stream/276895-t-compiler.2Fshrinkmem-sprint/topic/mir_opt_level.20changes">#t-compiler/shrinkmem-sprint &gt; mir_opt_level changes</a></p>



<a name="228812401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228812401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228812401">(Mar 04 2021 at 17:13)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> sorry didn't see this message. Yes they seem accurate. Linux reports roughly double the memory usage, but that could plausibly be explained by the linker invocations not being in the Windows stats</p>



<a name="228817907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228817907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228817907">(Mar 04 2021 at 17:45)</a>:</h4>
<p>Or it could be chalked up to differences in the underlying allocators. When you say “Linux reports …”, is that from perf? or local builds? (I’m mostly curious whether part of this could be chalked up to jemalloc …)</p>



<a name="228818092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228818092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228818092">(Mar 04 2021 at 17:46)</a>:</h4>
<p>well, glibc or musl or whatever vs. windows system allocator is likely pretty different too</p>



<a name="228818156"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228818156" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228818156">(Mar 04 2021 at 17:46)</a>:</h4>
<p>right.</p>



<a name="228818238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228818238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228818238">(Mar 04 2021 at 17:47)</a>:</h4>
<p>arguably it would be <em>good</em> to do all these measurements with jemalloc linked in. But wait, do we even support jemalloc on Windows anyway?</p>



<a name="228818289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228818289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228818289">(Mar 04 2021 at 17:47)</a>:</h4>
<p>no, not really, just linux</p>



<a name="228818298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228818298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228818298">(Mar 04 2021 at 17:47)</a>:</h4>
<p>(that is, I’m suggesting it would be useful as a way to eliminate one source of variation)</p>



<a name="228818313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228818313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228818313">(Mar 04 2021 at 17:47)</a>:</h4>
<p>Linux and Mac OS X, no?</p>



<a name="228818329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228818329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228818329">(Mar 04 2021 at 17:47)</a>:</h4>
<p>(and really probably just x86_64-unknown-linux-gnu)</p>



<a name="228818370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228818370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228818370">(Mar 04 2021 at 17:48)</a>:</h4>
<p>I think macOS turned out to not actually enable it? I forget, there's a recent thread</p>



<a name="228818409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228818409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228818409">(Mar 04 2021 at 17:48)</a>:</h4>
<p>Hmm I had thought the builders linked in jemalloc on Mac OS X.</p>



<a name="228818436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228818436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228818436">(Mar 04 2021 at 17:48)</a>:</h4>
<p>Oh that’s right, that recent thread, I forgot.</p>



<a name="228818442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228818442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228818442">(Mar 04 2021 at 17:48)</a>:</h4>
<p>they <em>try</em> for sure</p>



<a name="228818792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228818792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228818792">(Mar 04 2021 at 17:50)</a>:</h4>
<p>There's a PR to actually enable jemalloc on macs (<a href="https://github.com/rust-lang/rust/pull/82642">https://github.com/rust-lang/rust/pull/82642</a>)</p>



<a name="228821739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228821739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228821739">(Mar 04 2021 at 18:08)</a>:</h4>
<p>I made a PR which shrinks max memory usage a bit: <a href="https://github.com/rust-lang/rust/pull/82727">https://github.com/rust-lang/rust/pull/82727</a> any takers?</p>



<a name="228822818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228822818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228822818">(Mar 04 2021 at 18:15)</a>:</h4>
<p>how are you telling its coming from LLVM optimizing things?</p>



<a name="228822889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228822889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228822889">(Mar 04 2021 at 18:15)</a>:</h4>
<p>(it could be within LLVM if you're looking at bootsrap timings, but not otherwise)</p>



<a name="228825889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228825889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228825889">(Mar 04 2021 at 18:32)</a>:</h4>
<p><span class="user-mention silent" data-user-id="124288">oli</span> <a href="#narrow/stream/276895-t-compiler.2Fshrinkmem-sprint/topic/sprint.20day.204.20chat/near/228821739">said</a>:</p>
<blockquote>
<p>I made a PR which shrinks max memory usage a bit: <a href="https://github.com/rust-lang/rust/pull/82727">https://github.com/rust-lang/rust/pull/82727</a> any takers?</p>
</blockquote>
<p>you may want to separate out the tidy changes. At least, github "hide whitespace changes" is missing a lot of cases I would have expected to be treated as pure-whitespace</p>



<a name="228834506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228834506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228834506">(Mar 04 2021 at 19:25)</a>:</h4>
<p><span class="user-mention silent" data-user-id="124288">oli</span> <a href="#narrow/stream/276895-t-compiler.2Fshrinkmem-sprint/topic/sprint.20day.204.20chat/near/228821739">said</a>:</p>
<blockquote>
<p>I made a PR which shrinks max memory usage a bit: <a href="https://github.com/rust-lang/rust/pull/82727">https://github.com/rust-lang/rust/pull/82727</a> any takers?</p>
</blockquote>
<p>looks great to me</p>



<a name="228834601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228834601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228834601">(Mar 04 2021 at 19:26)</a>:</h4>
<p>agreed with Felix, there's a lot of rustfmt changes that may be better on a separate commit for easier reading</p>



<a name="228921414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228921414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228921414">(Mar 05 2021 at 09:11)</a>:</h4>
<p>Oh... I didn't see those... I did the cranelift thing afterwards and forgot to check the PR diff again</p>



<a name="228924531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint%20day%204%20chat/near/228924531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/276895-t-compiler/shrinkmem-sprint/topic/sprint.20day.204.20chat.html#228924531">(Mar 05 2021 at 09:36)</a>:</h4>
<p><span class="user-mention silent" data-user-id="123586">nagisa</span> <a href="#narrow/stream/276895-t-compiler.2Fshrinkmem-sprint/topic/sprint.20day.204.20chat/near/228822818">said</a>:</p>
<blockquote>
<p>how are you telling its coming from LLVM optimizing things?</p>
</blockquote>
<p>I looked at the detailed log of <code>inflate-opt full</code>: <a href="https://perf.rust-lang.org/detailed-query.html?commit=fe1d496e550e5902514bf91cb314f7ffa8813ec6&amp;base_commit=7f32f62aa5ceba1b795f3702e502d8473238be6b&amp;benchmark=inflate-opt&amp;run_name=full">https://perf.rust-lang.org/detailed-query.html?commit=fe1d496e550e5902514bf91cb314f7ffa8813ec6&amp;base_commit=7f32f62aa5ceba1b795f3702e502d8473238be6b&amp;benchmark=inflate-opt&amp;run_name=full</a> and it looks like typeck got faster, but LLVM balances LTO speed against LLVM passes speed</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>